package view;

import javax.swing.BorderFactory;
import javax.swing.DefaultComboBoxModel;
import javax.swing.GroupLayout;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextField;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;

public class ProViewSupPanel extends JPanel {

	private static final long serialVersionUID = 1L;
	private JLabel lblAddress_ViewSup;
	private JLabel lblID_ViewSup;
	private JLabel lblName_ViewSup;
	private JLabel lblPhone_ViewSup;
	private JTextField tfID_ViewSup;
	private JTextField tfName_ViewSup;
	private JTextField tfPhone_ViewSup;
	private JTextField tfAddress_ViewSup;
	private JButton btnEdit_ViewSup;
	private JButton btnRemove_ViewSup;
	private JButton btnSearch_ViewSup;
	private JButton btnUpdate_ViewSup;
	private JComboBox<String> cbbSearch_ViewSup;
	private JLabel lblSearchBy_ViewSup;
	private JPanel panelInfor_ViewSup;
	private JPanel panelSearch_ViewSup;
	private JPanel panelList_ViewSup;
	private JScrollPane jScrollPane1;
	private JTable table_ViewSup;
	private JTextField tfSearch_ViewSup;

	public ProViewSupPanel() {
		initComponents();
	}

	@SuppressWarnings({ "unchecked", "rawtypes" })
	private void initComponents() {

		panelInfor_ViewSup = new JPanel();
		lblPhone_ViewSup = new JLabel();
		lblName_ViewSup = new JLabel();
		lblAddress_ViewSup = new JLabel();
		tfID_ViewSup = new JTextField();
		tfName_ViewSup = new JTextField();
		tfPhone_ViewSup = new JTextField();
		tfAddress_ViewSup = new JTextField();
		lblID_ViewSup = new JLabel();
		panelSearch_ViewSup = new JPanel();
		tfSearch_ViewSup = new JTextField();
		btnSearch_ViewSup = new JButton();
		lblSearchBy_ViewSup = new JLabel();
		cbbSearch_ViewSup = new JComboBox();
		btnEdit_ViewSup = new JButton();
		btnUpdate_ViewSup = new JButton();
		btnRemove_ViewSup = new JButton();
		panelList_ViewSup = new JPanel();
		jScrollPane1 = new JScrollPane();
		table_ViewSup = new JTable();

		setBackground(new java.awt.Color(255, 255, 255));
		setLayout(null);

		panelInfor_ViewSup.setBackground(new java.awt.Color(255, 255, 255));
		panelInfor_ViewSup.setBorder(BorderFactory.createTitledBorder(null, "Information",
				TitledBorder.DEFAULT_JUSTIFICATION,
				TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 1,
						12)));
		panelInfor_ViewSup.setLayout(null);

		lblPhone_ViewSup.setFont(new java.awt.Font("Calibri", 0, 16));
		lblPhone_ViewSup.setText("Phone:");
		panelInfor_ViewSup.add(lblPhone_ViewSup);
		lblPhone_ViewSup.setBounds(370, 30, 50, 20);

		lblName_ViewSup.setFont(new java.awt.Font("Calibri", 0, 16));
		lblName_ViewSup.setText("Supplier Name:");
		panelInfor_ViewSup.add(lblName_ViewSup);
		lblName_ViewSup.setBounds(20, 60, 110, 20);

		lblAddress_ViewSup.setFont(new java.awt.Font("Calibri", 0, 16));
		lblAddress_ViewSup.setText("Address:");
		panelInfor_ViewSup.add(lblAddress_ViewSup);
		lblAddress_ViewSup.setBounds(370, 60, 70, 20);
		panelInfor_ViewSup.add(tfID_ViewSup);
		tfID_ViewSup.setBounds(150, 30, 170, 20);
		panelInfor_ViewSup.add(tfName_ViewSup);
		tfName_ViewSup.setBounds(150, 60, 170, 20);
		panelInfor_ViewSup.add(tfPhone_ViewSup);
		tfPhone_ViewSup.setBounds(470, 30, 170, 20);
		panelInfor_ViewSup.add(tfAddress_ViewSup);
		tfAddress_ViewSup.setBounds(470, 60, 170, 20);

		lblID_ViewSup.setFont(new java.awt.Font("Calibri", 0, 16));
		lblID_ViewSup.setText("ID:");
		panelInfor_ViewSup.add(lblID_ViewSup);
		lblID_ViewSup.setBounds(20, 30, 50, 20);

		add(panelInfor_ViewSup);
		panelInfor_ViewSup.setBounds(0, 0, 690, 100);

		panelSearch_ViewSup.setBackground(new java.awt.Color(255, 255, 255));
		panelSearch_ViewSup.setBorder(BorderFactory.createTitledBorder(null, "Search",
				TitledBorder.DEFAULT_JUSTIFICATION,
				TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 1,
						12)));
		panelSearch_ViewSup.setLayout(null);
		panelSearch_ViewSup.add(tfSearch_ViewSup);
		tfSearch_ViewSup.setBounds(10, 30, 130, 20);

		btnSearch_ViewSup.setIcon(new ImageIcon("icon/search.png"));
		btnSearch_ViewSup.setText("Search");
		btnSearch_ViewSup.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				jButton5ActionPerformed(evt);
			}
		});
		panelSearch_ViewSup.add(btnSearch_ViewSup);
		btnSearch_ViewSup.setBounds(240, 30, 90, 20);

		lblSearchBy_ViewSup.setText("By");
		panelSearch_ViewSup.add(lblSearchBy_ViewSup);
		lblSearchBy_ViewSup.setBounds(150, 30, 20, 20);

		cbbSearch_ViewSup.setModel(new DefaultComboBoxModel(new String[] { "Item 1",
				"Item 2", "Item 3", "Item 4" }));
		panelSearch_ViewSup.add(cbbSearch_ViewSup);
		cbbSearch_ViewSup.setBounds(170, 30, 56, 20);

		add(panelSearch_ViewSup);
		panelSearch_ViewSup.setBounds(0, 110, 340, 80);

		btnEdit_ViewSup.setBackground(new java.awt.Color(255, 255, 255));
		btnEdit_ViewSup.setIcon(new ImageIcon("icon/em_edit.png"));
		btnEdit_ViewSup.setText("Edit");
		add(btnEdit_ViewSup);
		btnEdit_ViewSup.setBounds(360, 130, 90, 30);

		btnUpdate_ViewSup.setBackground(new java.awt.Color(255, 255, 255));
		btnUpdate_ViewSup.setIcon(new ImageIcon("icon/save.png"));
		btnUpdate_ViewSup.setText("Update");
		btnUpdate_ViewSup.setEnabled(false);
		add(btnUpdate_ViewSup);
		btnUpdate_ViewSup.setBounds(460, 130, 90, 30);

		btnRemove_ViewSup.setIcon(new ImageIcon("icon/em_delete.png"));
		btnRemove_ViewSup.setText("Remove");
		add(btnRemove_ViewSup);
		btnRemove_ViewSup.setBounds(560, 130, 100, 30);


		panelList_ViewSup.setBackground(new java.awt.Color(255, 255, 255));
		panelList_ViewSup.setBorder(BorderFactory.createTitledBorder(null,
				"List Supplier", TitledBorder.DEFAULT_JUSTIFICATION,
				TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri", 1,
						12)));

		table_ViewSup.setModel(new DefaultTableModel(new Object[][] {
				{ null, null, null, null }, { null, null, null, null },
				{ null, null, null, null }, { null, null, null, null },
				{ null, null, null, null } }, new String[] { "ID", "Name",
				"Phone", "Address" }));
		jScrollPane1.setViewportView(table_ViewSup);

		GroupLayout jPanel4Layout = new GroupLayout(panelList_ViewSup);
		panelList_ViewSup.setLayout(jPanel4Layout);
		jPanel4Layout.setHorizontalGroup(jPanel4Layout.createParallelGroup(
				GroupLayout.Alignment.LEADING).addComponent(jScrollPane1,
				GroupLayout.DEFAULT_SIZE, 678, Short.MAX_VALUE));
		jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(
				GroupLayout.Alignment.LEADING).addGroup(
				jPanel4Layout
						.createSequentialGroup()
						.addComponent(jScrollPane1, GroupLayout.PREFERRED_SIZE,
								152, GroupLayout.PREFERRED_SIZE)
						.addGap(0, 0, Short.MAX_VALUE)));

		add(panelList_ViewSup);
		panelList_ViewSup.setBounds(0, 190, 690, 170);
	}// </editor-fold>//GEN-END:initComponents

	private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {

	}

}
